package dbsync4j.core.concrete;

import com.mythosis.beandiff.DiffField;
import com.mythosis.beandiff.Diffable;

import dbsync4j.core.behavior.Column;
import dbsync4j.core.behavior.DatabaseObject;
import dbsync4j.core.behavior.ForeignKeyMapping;

@Diffable
public class ConcreteForeignKeyMapping extends AbstractDependantObject implements ForeignKeyMapping {

	private Column foreignKeyColumn;
	private Column primaryKeyColumn;
	@DiffField
	private int keySequence;

	public ConcreteForeignKeyMapping(DatabaseObject databaseObject,
			String name, 
			String remarks) {
		
		super(databaseObject, name, remarks);
	}
	
	@Override
	public Column getForeignKeyColumn() {
		return foreignKeyColumn;
	}

	@Override
	public int getKeySequence() {
		return keySequence;
	}

	@Override
	public Column getPrimaryKeyColumn() {
		return primaryKeyColumn;
	}

	/**
	 * @param foreignKeyColumn the foreignKeyColumn to set
	 */
	public void setForeignKeyColumn(Column foreignKeyColumn) {
		this.foreignKeyColumn = foreignKeyColumn;
	}

	/**
	 * @param primaryKeyColumn the primaryKeyColumn to set
	 */
	public void setPrimaryKeyColumn(Column primaryKeyColumn) {
		this.primaryKeyColumn = primaryKeyColumn;
	}

	/**
	 * @param keySequence the keySequence to set
	 */
	public void setKeySequence(int keySequence) {
		this.keySequence = keySequence;
	}

}
